package entity;

/**
 * SortId entity. @author MyEclipse Persistence Tools
 */

public class SortId implements java.io.Serializable {

	// Fields

	private Type type;
	private Contest contest;

	// Constructors

	/** default constructor */
	public SortId() {
	}

	/** full constructor */
	public SortId(Type type, Contest contest) {
		this.type = type;
		this.contest = contest;
	}

	// Property accessors

	public Type getType() {
		return this.type;
	}

	public void setType(Type type) {
		this.type = type;
	}

	public Contest getContest() {
		return this.contest;
	}

	public void setContest(Contest contest) {
		this.contest = contest;
	}

	public boolean equals(Object other) {
		if ((this == other))
			return true;
		if ((other == null))
			return false;
		if (!(other instanceof SortId))
			return false;
		SortId castOther = (SortId) other;

		return ((this.getType() == castOther.getType()) || (this.getType() != null
				&& castOther.getType() != null && this.getType().equals(
				castOther.getType())))
				&& ((this.getContest() == castOther.getContest()) || (this
						.getContest() != null && castOther.getContest() != null && this
						.getContest().equals(castOther.getContest())));
	}

	public int hashCode() {
		int result = 17;

		result = 37 * result
				+ (getType() == null ? 0 : this.getType().hashCode());
		result = 37 * result
				+ (getContest() == null ? 0 : this.getContest().hashCode());
		return result;
	}

}